Skip to content

Conversation

@joshmoore
Copy link
Member

partial fix #418
migrated from #422 since the repo was removed.

TODO:

  • Add unit tests and/or doctests in docstrings
  • Add docstrings and API docs for any new/modified user-facing classes and functions
  • New/modified features documented in docs/tutorial.rst
  • Changes documented in docs/release.rst
  • AppVeyor and Travis CI passes
  • Test coverage is 100% (Coveralls passes)

@joshmoore
Copy link
Member Author

So it looks like partial read and objects don't mix:

FAILED zarr/tests/test_core.py::TestArrayWithFSStorePartialRead::test_structured_array_contain_object
FAILED zarr/tests/test_core.py::TestArrayWithFSStoreNestedPartialRead::test_structured_array_contain_object

@codecov
Copy link

codecov bot commented Aug 17, 2021

Codecov Report

Merging #702 (e30833c) into master (ce04aaa) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #702   +/-   ##
=======================================
  Coverage   99.94%   99.94%           
=======================================
  Files          30       30           
  Lines       10586    10611   +25     
=======================================
+ Hits        10580    10605   +25     
  Misses          6        6           
Impacted Files Coverage Δ
zarr/storage.py 100.00% <100.00%> (ø)
zarr/tests/test_core.py 100.00% <100.00%> (ø)

@joshmoore
Copy link
Member Author

This amounts to quite a simple change if someone wants to take a look:

-    if dtype == object:
+    if dtype.hasobject:

@joshmoore
Copy link
Member Author

closing in favor of #813

@joshmoore joshmoore closed this Aug 26, 2021
joshmoore added a commit to abergou/zarr-python that referenced this pull request Aug 26, 2021
joshmoore added a commit that referenced this pull request Aug 30, 2021
* Fix structured arrays that contain objects #806

* Ensures that the fill value of structured arrays that contain objects
  is encoded using object_codec.

* Add test and fix-up to ensure compatibility

* Update docs/release.rst

* Fixup unit testss

Don't specify protocol: makes unit tests pass in python3.7
N5 doesn't support object codecs

* Fixup linting error

Explicitly handle an error condition that can only happen if
encode_fill_value or decode_fill_value are directly called.

* Add encode/decode tests for codecov

* Explicitly import Pickle from numcodecs for mypy

* Migrate test from #702

With thanks to @ombschervister

* Install types-setuptools for CI

Co-authored-by: Attila Bergou <[email protected]>
Co-authored-by: Josh Moore <[email protected]>
Co-authored-by: jmoore <[email protected]>
@joshmoore joshmoore deleted the pr-422 branch August 30, 2021 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Numpy structured arrays containing an object

1 participant